/**
 * Copyright 2009-2010 - YangJiandong(chunquedong)
 * 
 * This file is part of ChunMap project
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
 * 你可以自由复制、传播本项目的下载包文件，但必须保持其完整性。
 * 我们不用对使用中的风险及由此造成的损失承担任何责任。
 * 详细情况请见《ChunMap许可协议》。

 * 想了解更多有关ChunMap的信息，请访问http://code.google.com/p/chunmap/
 */
package chunmap.model.geom;

/**
 * 几何体类型
 * 
 * @author chunquedong
 * 
 */
public enum GeometryType {
	
	None (-1,"NONE"),
	Point (0,"POINT"),
	LineString (1, "LINESTRING"),
	Polygon (2, "POLYGON"),

	MultiPoint(0, "MULTIPOINT"),
	MultiLineString(1, "MULTILINESTRING"),
	MultiPolygon (2, "MULTIPOLYGON"),
	GeometryCollection (3, "GEOMETRYCOLLECTION");

	int dim;
	String name;
	
	GeometryType(int dim,String name){
		this.dim=dim;
		this.name=name;
	}
	
	public int dimension() {
		return dim;
	}
	
	public String toString(){
		return name;
	}
}
